package com.kaily.timemanager.data.contract;

import android.content.Context;

import com.kaily.timemanager.data.DataListener;
import com.kaily.timemanager.obj.Task;
import com.kaily.timemanager.obj.TaskClass;

import java.util.List;

/**
 * Created by zhoulikai on 17/2/28.
 */

public class TaskContract {
    public interface View {
        public void setAllTask(List<TaskClass> task);

        public void notificationTaskClass(Presenter.TaskOp taskOp, TaskClass taskClass);

        public void notificationTask(Presenter.TaskOp taskOp, Task task);
    }

    public interface Presenter {

        enum TaskOp {
            ADD,
            UPDATE,
            DELETE
        }

        /**
         * 获取所有任务
         *
         * @param context
         */
        public void getAllTask(Context context);

        /**
         * 针对任务类别的操作
         *
         * @param context
         * @param taskClass
         * @param taskClassOp
         */
        public void operationTaskClass(Context context, TaskClass taskClass, TaskOp taskClassOp);

        /**
         * 对任务的操作
         *
         * @param context
         * @param task
         * @param taskClassOp
         */
        public void operationTask(Context context, Task task, TaskOp taskClassOp);

    }

    public interface Model {
        public void getAllTask(Context context, DataListener dataListener);

        public void operationTaskClass(Context context, TaskClass taskClass, Presenter.TaskOp taskClassOp, DataListener dataListener);

    }


}